/*
 *  Author: Honrun
 */
#ifndef _MICRO_LIST_H_
#define _MICRO_LIST_H_

#include "stdint.h"



#define MICRO_LIST_VALUE_MAX 0x7FFFFFFFFFFFFFFFULL





typedef struct MicroListStruct{
    struct MicroListStruct *pPrevious;
    struct MicroListStruct *pNext;

    int64_t value;                  /* 链表节点排序值 */

    void *pElement;                 /* 当前节点所属 */
}MicroListType;







int8_t cMicroListInit(MicroListType *ptypeList, int64_t lValue);
int8_t cMicroListInsert(MicroListType *ptypeListHead, MicroListType *ptypeListNew);
int8_t cMicroListInsertBefore(MicroListType *ptypeListBase, MicroListType *ptypeListNew);
int8_t cMicroListInsertAfter(MicroListType *ptypeListBase, MicroListType *ptypeListNew);
int8_t cMicroListInsertHead(MicroListType *ptypeListHead, MicroListType *ptypeListNew);
int8_t cMicroListInsertEnd(MicroListType *ptypeListHead, MicroListType *ptypeListNew);
int8_t cMicroListRemove(MicroListType *ptypeListNow);



#endif // DEVICESLIST_H_INCLUDED
